﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.Runtime.Serialization;


namespace Database
{
    [DataContract]
    public class Post
    {
        [DataMember]
        private int id;
        [DataMember]
        private string title;
        [DataMember]
        private string body;
        [DataMember]
        private DateTime creationTime;
        [DataMember]
        private User user;
        [DataMember]
        private int forumId;
        [DataMember]
        private int subForumId;
  
        private int ThreadId;

        public Post(int id, string title, string body, User user, int forumId, int subForumId, int ThreadId)
        {
            this.id = id;
            this.title = title;
            this.body = body;
            this.creationTime = DateTime.Now;
            this.user = user;
            this.forumId = forumId;
            this.subForumId = subForumId;
            this.ThreadId = ThreadId;
        }

        public string getTitle() {
            return this.title; 
        }

        public void setTitle(string title) {
            this.title = title;
        }

        public string getBody() {
            return this.body;
        }

        public void setBody(string body) {
            this.body = body;
        }

        public int getID() {
            return this.id; 
        }

        public DateTime getCreationTime() {
            return this.creationTime; 
        }

        public void setCreationTime(DateTime creationTime)
        {
            this.creationTime = creationTime;
        }
        public User getUser() {
            return this.user;
        }

        public int getForumId() {
            return this.forumId;
        }

        public int getSubForumId() {
            return this.subForumId;
        }

        public int getThreadId()
        {
            return this.ThreadId;
        }

    }
}
